package org.nidy.programexercise.MethodCitation;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class StaticCitation {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        Collections.addAll(list,"1","5","9","2","6");
        //常规方式转Int
        List<Integer>list2=new ArrayList<>();
        for (String s : list) {
            list2.add(Integer.parseInt(s));
        }
        //转换流及方法引用方式转Int
        list.stream().map(Integer::parseInt).forEach(System.out::println);
    }
}
